package com.lc.question.service.impl;

import com.lc.question.service.IStudentService;
import com.lc.question.dao.IStudentDao;
import com.lc.question.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("studentService")
public class StudentServiceImpl implements IStudentService {

    @Autowired
    IStudentDao studentDao;

    @Override //查询所有学生信息
    public List<Student> studentList() {
        List<Student> students = studentDao.studentList();
        return students;
    }

    @Override //根据学号查询某个学生信息
    public Student findStudentById(String stu_Id) {
        Student student = studentDao.findStudentById(stu_Id);
        return student;
    }

    @Override //多个条件模糊查询
    public List<Student> studentListById2(Student student) {
        return studentDao.studentListById2(student);
    }

    @Override //多个条件模糊查询是否存在指定数据--userId
    public Student studentById(Student student) {
        return studentDao.studentById(student);
    }

    @Override //学生调研结果总数据条数
    public int studentTotal(Student student) {
        return 0;
    }

    @Override //添加学生信息
    public void addStudent(Student student) {
        studentDao.addStudent(student);
    }



    @Override //测试
    public List<Student> test() {
        return studentDao.test();
    }


}
